import cv2 as cv
import numpy as np

img = cv.imread("assets/lena.jpg")

ksize = (11, 11)
# 均值滤波
#blur = cv.blur(img, ksize)
#中值滤波
#blur = cv.medianBlur(img, 5)
#高斯滤波
#blur = cv.GaussianBlur(img, ksize, 0)
#双边滤波
blur = cv.bilateralFilter(img, 9, 30, 100)

cv.imshow("blur", np.hstack((img, blur)))
cv.waitKey(0)

